#!/bin/bash

#Compile parser.h and parser.c needed by lexer.lex file
echo "compiling with bison..."
bison -vd -o ../syntax/parser.c ../syntax/parser.y
mv ../syntax/parser.h ../include/parser.h

#Compile lexer.c needed by the compiler
echo "compiling with flex..."
flex -o ../lexical/lexer.c ../lexical/lexer.lex
mv lexer.h ../include/lexer.h